﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="script_example_03.aspx.cs" MasterPageFile="~/main.master" EnableViewState="false" Inherits="sdk_category_script_example_03" %>

<%@ Register Src="../../modules/categories_v2.ascx" TagName="categories" TagPrefix="uc1" %>
<asp:Content ID="hd" ContentPlaceHolderID="HeadContent" runat="server">
    <link rel="stylesheet" type="text/css" href="../style.css" />
    <link rel="stylesheet" type="text/css" href="style.css" />
    <title>Restrict Parent / Child Categories - ASP.NET Category Script 2.0
    </title>
</asp:Content>
<asp:Content ID="pagecontent" ContentPlaceHolderID="MC" runat="server">
    <div id="msg" runat="server">
    </div>
    <div class="main_block ui-corner-all">
        <div class="item">
            <div class="item">
                <div class="module ui-corner-all">
                    <a id="hm" class="bld" runat="server"></a>&nbsp;&gt;&nbsp;<a id="sdk" class="bld"
                        runat="server"></a>&nbsp;&gt;&nbsp;<a id="vd" class="bld" runat="server"></a>&nbsp;&gt;&nbsp;Parent / Child Categories
                </div>
            </div>
            <div class="item_pad">
                <div class="module ui-corner-all">
                    <div class="heading">
                        <h3 id="cmt" runat="server">
                            Generate and Restrict Parent / Child Categories within Vertical Navigation.
                        </h3>
                    </div>
                    <div class="pd_5 ptext">
                        <p class="bgtext">
                          This example will generate vertical navigation and restrict parents (3 categories) and childes (5 category listing in each parent) 
                        </p>
                    </div>
                </div>
            </div>
            <div class="item_pad">
                <div class="module ui-corner-all">
                    <div class="heading">
                        <h3>
                            Examples &amp; Codes (Show All Categories, Parents / Childs)
                        </h3>
                    </div>
                    <div class="pd_5 ptext">
                        <div class="cscroll">
<pre class="csharpcode">
<span class="kwrd">if</span> (Categories1 != <span class="kwrd">null</span>)
        {
            Categories1.HeadingTitle = <span class="str">"Categories"</span>;
            Categories1.Type = 13; <span class="rem">// Category Type (13: Classified)</span>
            Categories1.MainCategoryURL = <span class="kwrd">false</span>;

            Categories1.ShowParentsOnly = <span class="kwrd">false</span>;
            Categories1.MoreLinkText = <span class="str">"see all"</span>;
            Categories1.MoreLinkToolTip = <span class="str">"Browse all categories"</span>;
            Categories1.MoreLinkUrl = <span class="str">"categories/"</span>;
            Categories1.NavigationCssClass = <span class="str">""</span>; <span class="rem">// clear css style</span>
            Categories1.ListingCssClass = <span class="str">""</span>;
            Categories1.isHeading = <span class="kwrd">false</span>;

            <span class="rem">// version 2.0 related</span>
            Categories1.Total_Records = 1000; <span class="rem">// display 10 records, if isAll=false</span>
            Categories1.isAll = <span class="kwrd">false</span>;
            Categories1.TotalParents = 3;
            Categories1.TotalChilds = 5;
        }</pre>
                        </div>
                    </div>
                    <div class="pd_5 ptext">
                        <p>
                            Css Style Sheet used in this example
                        </p>
                    </div>
                    <div class="cscroll">
                        <pre class="csharpcode">
#cnav01 { width: 400px; }
#cnav01 ul { list-style: none; margin: 0; padding: 0; }
#cnav01 li { border-bottom: 1px solid #ED9F9F; } 
#cnav01 li a:link, #navigation li a:visited  { font-size: 90%; display: block; padding: 0.4em 0 0.4em 0.5em; border-left: 12px solid #711515; border-right: 1px solid #711515; background-color: #B51032; color: #FFFFFF; text-decoration: none; } 
#cnav01 li a:hover { background-color: #711515; color: #FFFFFF; } 
#cnav01 ul ul { margin-left: 12px; } 
#cnav01 ul ul li { border-bottom: 1px solid #711515; margin:0; } 
#cnav01 ul ul a:link, #navigation ul ul a:visited { background-color: #ED9F9F; color: #711515; } 
#cnav01 ul ul a:hover { background-color: #7</pre>
                    </div>
                </div>
            </div>
            <div id="cnav01" class="item_pad ptext">
                <uc1:categories ID="Categories1" runat="server" />
            </div>
          
            <div class="item_pad">
                <div class="module ui-corner-all">
                    <!-- AddThis Button BEGIN -->
                    <div class="addthis_toolbox addthis_default_style addthis_32x32_style">
                        <a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2">
                        </a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4">
                        </a><a class="addthis_button_compact"></a><a class="addthis_counter addthis_bubble_style">
                        </a>
                    </div>
                    <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=mediasoftpro"></script>
                    <!-- AddThis Button END -->
                </div>
            </div>
        </div>
    </div>
</asp:Content>
